<% session[:ret_post] = session[:return_to] = nil %>
<% form_for(@category,:url=>{:action=>'create'}) do |c| %>
  <%= c.error_messages %>
  <h1>Category</h1>
  <select name="category[parent_id]" class="textInput">
    <option selected="selected" value="">No Parent</option>
    <% @categories.each do |cat| %>
      <% if cat.parent_id.nil? %>
        <option value="<%= cat.id %>"><%= cat.name %></option>
      <% end %>
    <% end %>
  </select>
  <h1>Rule Set</h1>
  <select name="category[user_level_rule_id]" class="textInput">
    <% @rules.each do |rule| %>
      <option value="<%= rule.id %>"><%= rule.name %></option>
    <% end %>
  </select>
  <h1>Category Name</h1>
  <%= c.text_field :name, :class=>"textInput" %>
  <br/>
  <span class="new_post_submit"><%= c.submit "Submit", :class=>"button" %></span>
<%  end %>